]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Move 'toggle-recording' binding into the shell
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 18 Apr 2012 18:45:09 +0000 (20:45 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 24 Apr 2012 15:37:44 +0000 (17:37 +0200)
The keybinding to toggle the screen recorder was implemented as a
signal on MetaScreen, as keybindings could only be defined in mutter
core. As this is no longer the case, we can move the binding into the
shell where it belongs.

https://bugzilla.gnome.org/show_bug.cgi?id=674377

data/org.gnome.shell.gschema.xml.in
js/ui/main.js

index 92a239f2501685e35f38a8e6e5e9e60b9581e3da..db23edac1c1e603483f01d9ed6af2ad59c08abea 100644 (file)
@@ -88,6 +88,13 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
         Keybinding to open the application menu.
       </_description>
     </key>
+    <key name="toggle-recording" type="as">
+      <default><![CDATA[['<Control><Shift><Alt>r']]]></default>
+      <_summary>Keybinding to toggle the screen recorder</_summary>
+      <_description>
+        Keybinding to start/stop the builtin screen recorder.
+      </_description>
+    </key>
   </schema>
 
   <schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"
index 07a31744cd1cdcda56e1b2c9dc198f54f6800527..523dabf0cbc28cf8f6f5b39ecb857605e8bd3653 100644 (file)
@@ -101,8 +101,11 @@ function _createGDMSession() {
 
 function _initRecorder() {
     let recorderSettings = new Gio.Settings({ schema: 'org.gnome.shell.recorder' });
+    let bindingSettings = new Gio.Settings({ schema: 'org.gnome.shell.keybindings' });
 
-    global.screen.connect('toggle-recording', function() {
+    global.display.add_keybinding('toggle-recording',
+                                  bindingSettings,
+                                  Meta.KeyBindingFlags.NONE, function() {
         if (recorder == null) {
             recorder = new Shell.Recorder({ stage: global.stage });
         }